﻿<%@ Page Title="" Language="C#" 
    MasterPageFile="/Medianamik/MasterPages/MedianamikModalWindow.Master" 
    AutoEventWireup="true" ValidateRequest="false" CodeBehind="AddResourceWindow.aspx.cs" 
    Inherits="Medianamik.UI.Web.ModalWindows.AddResourceWindow" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<asp:Content ContentPlaceHolderID="HeaderContentHolder" runat="server">
    <telerik:RadScriptBlock runat="server" ID="scriptBlock">
	    <script type="text/javascript">
            //<![CDATA[
            function GetRadWindow()
            {
                var oWindow = null;
                if (window.radWindow) oWindow = window.radWindow;
                else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
                return oWindow;
            }

            function Cancel_Clicked()
            {
                var oWindow = GetRadWindow();
                oWindow.argument = null;
                oWindow.Close();
            }

            function closeWindow(reloadType) {
                var arg = new Object();
                arg.reloadType = reloadType;
                var oWindow = GetRadWindow();
                oWindow.Close(arg);
            }
            //]]>            
	    </script>
	</telerik:RadScriptBlock>
	<style type="text/css">
	    #ModalBody
	    {
	        margin-right:12px;
	    }
	</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CenterContent" runat="server">
    <asp:ScriptManager ID="MedianamikScriptManager" EnableHistory="true" EnablePageMethods="true" runat="server"  EnablePartialRendering="true" ScriptMode="Release" />
    <fieldset>
        <div class="Titre12pxBordure" style="padding-right:10px;">
            <asp:Label runat="server" Text="<%$ Resources : Medianamik_ResourceManagement, AddResource %>"></asp:Label>
        </div>
        <asp:ValidationSummary runat="server" CssClass="ValidationSummary" />
        <asp:Label AssociatedControlID="ddlResourceSets" runat="server" Text="<%$ Resources : Medianamik_ResourceManagement, ResourceSets %>" />
        <telerik:RadComboBox ID="ddlResourceSets" runat="server" Width="100%" AllowCustomText="true" Skin="Medianamik" EnableEmbeddedSkins="false"></telerik:RadComboBox>
        <asp:RequiredFieldValidator runat="server" ControlToValidate="ddlResourceSets" ErrorMessage="<%$ Resources : Medianamik_ResourceManagement, ResourceSetRequired %>" Display="None" />
        <br />
        <asp:Label AssociatedControlID="txtResourceId" runat="server" Text="<%$ Resources : Medianamik_ResourceManagement, ResourceId %>" />
        <asp:TextBox ID="txtResourceId" runat="server" Width="100%" />
        <asp:RequiredFieldValidator runat="server" ControlToValidate="txtResourceId" ErrorMessage="<%$ Resources : Medianamik_ResourceManagement, ResourceIdRequired %>" Display="None" />
        <asp:Repeater ID="rptValues" runat="server">
        <ItemTemplate>
            <asp:HiddenField ID="locale" runat="server" Value='<%#Container.DataItem %>' />
            <asp:Label runat="server" AssociatedControlID="value" Text='<%#(Container.DataItem as string).ToUpper() %>' />
            <asp:TextBox ID="value" runat="server" TextMode="MultiLine" Rows="2" Width="100%" />
        </ItemTemplate>
        </asp:Repeater>
        <p style="margin-top:1em;">
            <asp:Button ID="AddButton" runat="server" OnClick="Add" Text="<%$ Resources : Medianamik_Global, Add %>" class="Btn" />&nbsp;
            <input type="button" class="Btn" value="<%=Resources("Medianamik_Global", "Cancel") %>" onclick="Cancel_Clicked();" />
        </p>
    </fieldset>
</asp:Content>
